import http from '../utils/request.js'

// 登录
export function login(data) {
	return http({
		url: '/appLogin/login',
		method: 'POST',
		data
	});
};

// 短信验证码
export function smsMobileCode(data) {
	return http({
		url: '/appLogin/smsMobileCode',
		method: 'POST',
		data
	});
};

// 注册
export function setRegister(data) {
	return http({
		url: '/appLogin/register',
		method: 'POST',
		data
	});
};

// 重置密码
export function setReset(data) {
	return http({
		url: '/myuser/Forgetpassword',
		method: 'POST',
		data
	});
};

// 退出登录
export function logout(data) {
	return http({
		url: '/appLogin/logout',
		method: 'POST',
		data:data
	});
};

// 热更新
export function getPatchManage() {
	return http({
		url: '/home/VersionCode',
		method: 'GET'
	});
};

// 忘记密码验证码
export function missPassword(data) {
	return http({
		url: '/appLogin/missPassword',
		method: 'POST',
		data
	});
};

// 验证码登录
export function Codelogin(data) {
	return http({
		url: '/user/Codelogin',
		method: 'GET',
		data
	});
};

// 登录短信验证码
export function loginSmsCode(data) {
	return http({
		url: '/user/loginSmsCode',
		method: 'POST',
		data
	});
};

//注销短信验证码
export function CloseAccountSmsCode(data) {
	return http({
		url: '/user/CloseAccountSmsCode',
		method: 'POST',
		data
	});
};

//注销账号
export function CloseAccount(data) {
	return http({
		url: '/user/CloseAccount',
		method: 'POST',
		data: data
	});
};

// 支付宝认证查询
export function alipayAccredit(data) {
	return http({
		url: '/myuser/alipayAccredit',
		method: 'GET',
		data
	});
};

// 获取验证码
export function getCodeImg() {
  return http({
    url: '/captchaImage',
    method: 'GET',
  })
}